package operation;

import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: GodK
 * Date: 2024-03-16
 * Time: 19:26
 */
public class ExitOperation implements IOPeration {
    @Override
    public void work(BookList bookList) {
        System.out.println("退出系统......");
        int currentSize = bookList.getUsedSize();
        for (int i = 0; i < currentSize; i++) {
            bookList.setBook(i,null);
        }

        System.exit(0);
    }
}
